package com.lhd_gm.scheduledtasksystem.service.impl;

import com.lhd_gm.scheduledtasksystem.dao.JobLogDao;
import com.lhd_gm.scheduledtasksystem.pojo.JobLog;
import com.lhd_gm.scheduledtasksystem.service.JobLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Optional;

@Service
@Transactional
public class JobLogServiceImpl implements JobLogService {
    @Autowired
    private JobLogDao jobLogDao;

    @Override
    public void jobLogSave(JobLog jobLog) {
        jobLogDao.save(jobLog);
    }

    @Override
    public Optional<JobLog> findJobLogById(long id) {
        return jobLogDao.findById(id);
    }
}
